package org.example.kafka_test.websocket;

import org.springframework.stereotype.Component;

@Component
public class ConsumerLinster  {
    /**
     * 构造函数，用于初始化和启动Kafka监听器
     */
    public ConsumerLinster(){
        // 输出启动Kafka监听器的信息
        System.out.println("启用Kafka监听器");

        // 创建SocketConsumer实例
        SocketConsumer socketConsumer = new SocketConsumer();

        // 启动SocketConsumer
        socketConsumer.start();

        // 输出Kafka监听器启动成功的信息
        System.out.println("Kafka监听器启用成功");
    }
}